package controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * 测试controller
 *
 * @author jxd
 * @version 1.0 *
 * @date 2020/11/25 10:14
 */
@Controller
@RequestMapping("/welcome")
public class WelcomeController {


    @RequestMapping("/index")
    public ModelAndView index(ModelAndView modelAndView) {
        modelAndView.addObject("name", "笑傲江湖");
        modelAndView.setViewName("welcome");
        return modelAndView;
    }
}
